<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="__PUBLIC__/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/lib/font-awesome/font-awesome.min.css" rel="stylesheet" type="text/css" />
<!--[if IE 7]>
<link href="lib/font-awesome/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link href="__PUBLIC__/lib/iconfont/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>用户编辑</title>
</head>
<body>
<div class="pd-20">
  <form action="{:U('admin/user/editsave')}" method="post" class="form form-horizontal"  enctype="multipart/form-data">
    <div class="row cl">
      <input type="hidden" value="<?php echo  $userData[0]['id'] ?>" name="userid">
      <label class="form-label col-3"><span class="c-red">*</span>用户名：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text" name="username" value="<?php echo  $userData[0]['username'] ?>" placeholder="用户名"  name="username" >
      </div>
      <div class="col-4"></div>
    </div>
    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>性别：</label>
      <div class="formControls col-5 skin-minimal">
        <div class="radio-box">
          <input type="radio" id="sex-1" name="sex" value="1" datatype="*" <?php if($userData[0]['sex']==1) echo 'checked'; ?> nullmsg="请选择性别！">
          <label for="sex-1">男</label>
        </div>
        <div class="radio-box">
          <input type="radio" value="2" id="sex-2" name="sex" <?php if($userData[0]['sex']==2 ) echo 'checked';?>>
          <label for="sex-2">女</label>  
        </div>
        <div class="radio-box">
          <input type="radio" id="sex-3" value="0" name="sex" <?php if($userData[0]['sex']==0 ) echo 'checked'; ?>>
          <label for="sex-3">保密</label>
        </div>
      </div>
      <div class="col-4"> </div>
    </div>
    <!-- 用户密码 -->
    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>密码：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text"  placeholder="用户手机号码" id="user-tel" name="password"   value="<?php echo $userData[0]['password'] ?>">
      </div>
      <div class="col-4"> </div>
    </div>

    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>用户状态：</label>
      <div class="formControls col-5 skin-minimal">
        <div class="radio-box">
          <input type="radio"  name="status" value="1" <?php if($userData[0]['status']==1) echo 'checked'; ?> >
          <label for="status-1">启用</label>
        </div>
        <div class="radio-box">
          <input type="radio"  name="status" value="-1" <?php if($userData[0]['status']== -1  ) echo 'checked';?>>
          <label for="status-2">停用</label>
        </div>
      </div>
      <div class="col-4"></div>
    </div>

    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>手机：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text"  placeholder="用户手机号码" id="user-tel" name="phone"  value="<?php echo $userData[0]['phone'] ?>">
      </div>
      <div class="col-4"> </div>
    </div>
    
    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>邮箱：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text" placeholder="@" value="<?php echo $userData[0]['email'] ?>" name="email" id="email" datatype="e" nullmsg="请输入邮箱">
      </div>
      <div class="col-4"> </div>
    </div>
    <div class="row cl">
      <label class="form-label col-3">头像：</label>
      <div class="formControls col-5">
        <span class="btn-upload form-group">
        <!-- <input type="file"  name="facefile" > -->
          <input class="input-text upload-url" type="text" name="uploadfile"   style="width:200px">
          <a href="javascript:void();" class="btn btn-primary radius upload-btn"><i class="iconfont">&#xf0020;</i> 浏览文件</a>
          <input type="file"  name="facefile" class="input-file">
          <input type="hidden" name="oldface" value="<?php echo $userData[0]['face'] ?>">
        </span>
        <?php
          if( $userData[0]['face'] == '' || is_null($userData[0]['face'])){
            ?>
               <span style="padding-left:20px;color:red" >用户未上传头像</span>
            <?php
          }else{
            ?>
              <span style="padding-left:20px;" class="themouseon" userid="<?php echo $userData[0]['id'] ?>"><a href="javascript:void()">已上传图片大图</a>
               <img src="" width="300px" height="300px" style="display:none;position:absolute;bottom:-80px;z-index:1;right:-80px;" id="hideimg" >
              </span>
            <?php
          }
        ?>
      </div>
      <div class="col-4"></div>
     
    </div>
    <div class="row cl">
      <label class="form-label col-3">个性签名：</label>
      <div class="formControls col-5">
        <textarea name="signnature" cols="" rows="" class="textarea"  placeholder="说点什么...最少输入5个字符" datatype="*5-100" dragonfly="true" nullmsg="备注不能为空！" onKeyUp="textarealength(this,100)"><?php echo $userData[0]['signnature'] ?></textarea>
        <p class="textarea-numberbar"><em class="textarea-length">0</em>/100</p>
      </div>
      <div class="col-4"> </div>
    </div>
    <div class="row cl">
      <div class="col-9 col-offset-3">
        <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
      </div>
    </div>
  </form>
</div>
</div>
<script type="text/javascript" src="__PUBLIC__/lib/jquery.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/lib/icheck/jquery.icheck.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/lib/Validform_v5.3.2.js"></script> 
<script type="text/javascript" src="__PUBLIC__/js/H-ui.js"></script> 
<script type="text/javascript" src="__PUBLIC__/js/H-ui.admin.js"></script> 
<script type="text/javascript">
$(function(){
	$("#form-user-add").Validform({
		tiptype:2,
	});
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
});
</script> 
<script>

$('.themouseon').mouseover(function(event) {
  var userid = $(this).attr('userid');
  var hideimg = $('#hideimg');
  var url = '__ROOT__';
  $.ajax({
    url: '{:U("admin/user/ajaxuserface")}',
    type: 'POST',
    dataType: 'json',
    data: {theid: userid},
    success:function(data){
      hideimg.css('display', 'block');
      hideimg.attr('src', url + '/' +data.img);
    },
  });
});
$('.themouseon').mouseout(function(event) {
    $('#hideimg').css('display', 'none');
    // hideimg.attr('src', url + '/' +data.img);
});
</script>
</body>
</html>